package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    ShoppingCart getByCondition(ShoppingCart shoppingCart);


    void update(ShoppingCart cart);


    void insert(ShoppingCart cart);

    /**
     * 根据用户id查询
     * @param currentId
     * @return
     */
    List<ShoppingCart> getByUserId(Long currentId);

    /**
     * 清空购物车
     * @param currentId
     */
    void deleteByUserId(Long currentId);
}
